package com.zenithmind.exam.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 考试统计实体类
 * 
 * @author ZenithMind
 * @since 2024-07-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "考试统计实体", description = "考试统计信息")
@TableName("exam_statistics")
public class ExamStatistics {

    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 考试ID
     */
    @NotBlank(message = "考试ID不能为空")
    @Schema(description = "考试ID")
    private String examId;

    /**
     * 总参与人数
     */
    @Schema(description = "总参与人数")
    private Integer totalParticipants;

    /**
     * 已提交人数
     */
    @Schema(description = "已提交人数")
    private Integer submittedCount;

    /**
     * 平均分
     */
    @Schema(description = "平均分")
    private BigDecimal avgScore;

    /**
     * 最高分
     */
    @Schema(description = "最高分")
    private BigDecimal maxScore;

    /**
     * 最低分
     */
    @Schema(description = "最低分")
    private BigDecimal minScore;

    /**
     * 及格人数
     */
    @Schema(description = "及格人数")
    private Integer passCount;

    /**
     * 及格率
     */
    @Schema(description = "及格率")
    private BigDecimal passRate;

    /**
     * 平均用时（秒）
     */
    @Schema(description = "平均用时（秒）")
    private Integer avgDuration;

    /**
     * 分数分布（JSON格式）
     */
    @Schema(description = "分数分布（JSON格式）")
    private String scoreDistribution;

    /**
     * 难度分析（JSON格式）
     */
    @Schema(description = "难度分析（JSON格式）")
    private String difficultyAnalysis;

    /**
     * 题目分析（JSON格式）
     */
    @Schema(description = "题目分析（JSON格式）")
    private String questionAnalysis;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}
